import 'WriteoffBatchQuoteCardRangeDto.dart';

/// WriteoffTeamQuoteCreateDto
class WriteoffTeamQuoteCreateDto {
  /// 卡种类与卡分类信息
  final List<WriteoffBatchQuoteCardRangeDto> quoteCardRangeList;

  /// 报价，单位美元
  final String price;

  WriteoffTeamQuoteCreateDto({
    required this.quoteCardRangeList,
    required this.price,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['quoteCardRangeList'] = quoteCardRangeList
        .map((e) => e.toJson())
        .toList();
    data['price'] = price;
    return data;
  }

  factory WriteoffTeamQuoteCreateDto.fromJson(Map<String, dynamic> json) {
    return WriteoffTeamQuoteCreateDto(
      quoteCardRangeList: json['quoteCardRangeList'] != null
          ? List<WriteoffBatchQuoteCardRangeDto>.from(
              json['quoteCardRangeList'].map(
                (x) => WriteoffBatchQuoteCardRangeDto.fromJson(x),
              ),
            )
          : [],
      price: json['price'],
    );
  }
}
